package com.fqgj.xjd.user.integration.ocr.adapter;

import com.alibaba.fastjson.annotation.JSONField;
import com.fqgj.xjd.user.client.response.Pan;
import com.fqgj.xjd.user.integration.ocr.adapter.basic.BasicAdapter;
import com.fqgj.xjd.user.integration.ocr.adapter.basic.BasicAdapterBean;

/**
 * ·
 *
 * @author liuming
 * Created on 上午10:48 2019/1/3.
 */
public class PanAdapter extends BasicAdapter<Pan> {

    @JSONField(name = "name")
    private BasicAdapterBean name;

    @JSONField(name = "pan_no")
    private BasicAdapterBean panNo;

    @JSONField(name = "father")
    private BasicAdapterBean father;

    @JSONField(name = "date_of_issue")
    private BasicAdapterBean dateOfIssue;

    @JSONField(name = "date")
    private BasicAdapterBean date;

    public BasicAdapterBean getName() {
        return name;
    }

    public PanAdapter setName(BasicAdapterBean name) {
        this.name = name;
        return this;
    }

    public BasicAdapterBean getPanNo() {
        return panNo;
    }

    public PanAdapter setPanNo(BasicAdapterBean panNo) {
        this.panNo = panNo;
        return this;
    }

    public BasicAdapterBean getFather() {
        return father;
    }

    public PanAdapter setFather(BasicAdapterBean father) {
        this.father = father;
        return this;
    }

    public BasicAdapterBean getDateOfIssue() {
        return dateOfIssue;
    }

    public PanAdapter setDateOfIssue(BasicAdapterBean dateOfIssue) {
        this.dateOfIssue = dateOfIssue;
        return this;
    }

    public BasicAdapterBean getDate() {
        return date;
    }

    public PanAdapter setDate(BasicAdapterBean date) {
        this.date = date;
        return this;
    }

    @Override
    public Pan doAdapter() {
        Pan pan = new Pan();
        pan.setDate(this.date.getValue());
        pan.setFather(this.father.getValue());
        pan.setName(this.name.getValue());
        pan.setPanNo(this.panNo.getValue());
        return pan;
    }
}
